home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / dpkg / info / firefox-3.0.postinst < prev    next >
Encoding:
Text File  |  2009-09-07  |  1.0 KB  |  33 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. UPDATENOTIFIERDIR=/var/lib/update-notifier/user.d
  6. LIBDIR=/usr/lib/firefox-3.0.14
  7. APPNAME=firefox-3.0
  8.  
  9. if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then
  10.     update-alternatives --install /usr/bin/x-www-browser \
  11.         x-www-browser /usr/bin/$APPNAME 40
  12.     touch $LIBDIR/.autoreg
  13. fi
  14.  
  15. echo "Please restart all running instances of $APPNAME, or you will experience problems."
  16.  
  17. if [ -d $UPDATENOTIFIERDIR ] ; then
  18.   # pgrep matches application names from /proc/<pid>/status which is
  19.   # truncated according to sys/procfs.h definition. Problem is it's
  20.   # platform dependent. Either 15 or 16 chars.
  21.   if [ `/usr/bin/pgrep -x -c firefox` -ne 0 ] ;  then
  22.     cp -f $LIBDIR/$APPNAME-restart-required.update-notifier \
  23.         $UPDATENOTIFIERDIR/$APPNAME-restart-required
  24.   else
  25.     rm -f $UPDATENOTIFIERDIR/$APPNAME-restart-required
  26.   fi
  27. fi
  28.  
  29. # Clean a possible left over
  30. if [ -f $UPDATENOTIFIERDIR/firefox-trunk-restart-required ] ; then
  31.   rm -f $UPDATENOTIFIERDIR/firefox-trunk-restart-required
  32. fi
  33.